package com.peakproducts;

import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.Attributes;


/**
 * 
 */
public class ResponseHandler extends DefaultHandler {
    
    public String response;
    
    private String element;
    
    public void startElement(String uri, String localName, String qName, Attributes attributes){
        element = localName;
    }
    
    public void characters(char[] ch, int start, int length) {
        if ( element.equals( "string" ) ){
            response = new String( ch, start, length );
        }
    }
    
} 
